]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Use Meta.BackgroundActor instances instead of cloning global.background_actor
authorRui Matos <tiagomatos@gmail.com>
Mon, 29 Aug 2011 01:37:41 +0000 (02:37 +0100)
committerRui Matos <tiagomatos@gmail.com>
Mon, 29 Aug 2011 18:17:01 +0000 (19:17 +0100)
Instances of this class share a single CoglTexture behind the scenes which
allows us to show the background with different rendering options without
duplicating the texture data.

https://bugzilla.gnome.org/show_bug.cgi?id=656433

js/ui/overview.js
js/ui/workspaceThumbnail.js

index 0c5ea324104ab35fbbe2d244a46524d299e86135..4ecc378d8e677c943f65919ea97963735ea249a7 100644 (file)
@@ -115,9 +115,12 @@ Overview.prototype = {
             return;
         }
 
-        // The actual global.background_actor is inside global.window_group,
-        // which is hidden when displaying the overview, so we display a clone.
-        this._background = new Clutter.Clone({ source: global.background_actor });
+        // The main BackgroundActor is inside global.window_group which is
+        // hidden when displaying the overview, so we create a new
+        // one. Instances of this class share a single CoglTexture behind the
+        // scenes which allows us to show the background with different
+        // rendering options without duplicating the texture data.
+        this._background = Meta.BackgroundActor.new_for_screen(global.screen);
         this._background.hide();
         global.overlay_group.add_actor(this._background);
 
index 582842b8927d5307dd71e8c69e7ca048fa9edd94..7a239ef6c9e10d7219a6140f6652093efe3e8d0f 100644 (file)
@@ -167,7 +167,7 @@ WorkspaceThumbnail.prototype = {
                 return true;
             }));
 
-        this._background = new Clutter.Clone({ source: global.background_actor });
+        this._background = Meta.BackgroundActor.new_for_screen(global.screen);
         this._contents.add_actor(this._background);
 
         let monitor = Main.layoutManager.primaryMonitor;